package com.example.design_pattern.factory;

import java.util.ArrayList;
import java.util.List;

public abstract class Pizza {
    // 名称
    protected String name;
    // 面团类型
    protected String dough;
    // 酱料类型
    protected String sauce;
    // 一套佐料
    protected List toppings = new ArrayList<String>();

    public void prepare(){
        System.out.println("Prepare " + name);
        System.out.println("Tossing dough...");
        System.out.println("Adding sauce...");
        System.out.println("Adding toppings: ");
        for (Object topping : toppings) {
            System.out.println(" " + topping);
        }
    };
    public void bake(){
        System.out.println("Bake for 25 minutes at 350");
    };
    public void cut(){
        System.out.println("Cutting the pizza into diagonal slices");
    };
    public void box(){
        System.out.println("Place pizza in official SimplePizzaStore box");
    };

    public String getName() {
        return name;
    }
}
